package util.bootstrap;

import models.usuarios.Usuario;
import play.jobs.Job;
import play.jobs.OnApplicationStart;
import play.test.Fixtures;

@OnApplicationStart
public class CargadorInicial extends Job<String> {

	@Override
	public void doJob() {
		if (Usuario.count() == 0) {
			try {
				Fixtures.loadModels("initial-data.yml");
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
	}
}
